<?php

/**
 * Created by PhpStorm.
 * User: lee
 * Date: 2014/10/9
 * Time: 19:07
 */
class UserDomain
{
    public function login($userName, $passWord)
    {
        $criteria = new CDbCriteria();
        $criteria->condition = "user_name=:userName AND password=:password";
        $criteria->params = array(':userName' => $userName, ":password" => $passWord);
        $user = User::model()->find($criteria);
        return $user;
    }
} 